This forum is closed to new posts and
responses. Individual names altered for privacy purposes. The information contained in this website is provided for informational purposes only and should not be construed as a forum for customer support requests. Any customer support requests should be directed to the official HCL customer support channels below:
RE: What Fields Comprise The E-Mail Header ? ~Umberto Nongeroson 23.Sep.03 11:11 PM a Web browser General 6.0.2 CF1Windows 2000
Try the following as a starter:
Sub Initialize
Dim s As New NotesSession
Dim db As NotesDatabase
Dim dc As NotesDocumentCollection
Dim doc As NotesDocument,tempdoc As notesdocument
Dim m As String, n As String
Dim first As Integer, l As Integer
l = 1
Set db = s.CurrentDatabase
Set dc = db.UnprocessedDocuments
Set doc = dc.GetFirstDocument
While Not(doc Is Nothing)
'' create a temporary copy of the document
Set tempdoc = db.createdocument
Call doc.CopyAllItems( tempdoc )
'' re-read the document items to ensure you are getting the remaining fields and not the removed ones
NextOne:
Forall item In tempdoc.Items
If item.Name = "Received" Then
m = item.Text
first = False
For a = 1 To Len(m)
If ( Mid$(m,a,5) = " " ) Then
If ( first = False ) Then
Mid$(m,a,1) = Chr$(10)
first = True
Else
Mid$(m,a,1) = " "
End If
Else
first = False
End If
Next
If ( n = "" ) Then
n = "<Hop " & l & ">"
n = n & Chr$(13) & m
l = l + 1
Else
n = n & Chr$(13) & "<Hop " & l & ">" & Chr$(13) & m
l = l + 1
End If
m = ""
'' remove the current occurrence of the item so lotusscript will get the next one
Call item.Remove
'' write the document so it will not contain the removed item
Call tempdoc.save(True,True)
'' go back and re-read the document items to refresh the memory
Goto NextOne
End If
End Forall
If ( n <> "" ) Then
Messagebox n,,doc.Subject(0)
Else
Messagebox "No Internet Received Headers found.",,doc.Subject(0)
End If
n = ""
'' delete the temporary document
Call tempdoc.Remove( True )
Set doc = dc.GetNextDocument(doc)
Wend
End Sub